
<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,initial-scale=1.0,user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>排行榜 - {php echo $this->title;}</title>
    <meta name="keywords" content="排行榜">
    <meta name="description" content="排行榜">
    <link rel="stylesheet" href="../addons/dashen_zaoqizhuanqian/css/idangerous.swiper.css?Hz2">
    <link rel="stylesheet" href="../addons/dashen_zaoqizhuanqian/css/animation.css?Hz2">
    <link rel="stylesheet" href="../addons/dashen_zaoqizhuanqian/css/style.css?Hz2">
    <script src="../addons/dashen_zaoqizhuanqian/js/jquery-1.9.1.min.js?Hz2" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/jquery.form.js?Hz2" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/rem.js?Hz2" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/fastclick.js?Hz2" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/jquery.similar.msgbox.js" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/idangerous.swiper.min.js" type="text/javascript"></script>
    <script src="../addons/dashen_zaoqizhuanqian/js/common.js" type="text/javascript"></script>
    <style>
        .wrap{width:6.4rem;}
        .Color,.FixedPay .FixedPayList ul li.Hover span.iconfont{color:#FF801A;}
        .BorderColor{border-color:#FF801A;}
        .Bg,#mb_btn_ok,.Ad .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet-active{background:#FF801A;color:#fff;}
        .FColor{color:#32a7ad}
        .FBg{background:#32a7ad;color:#fff;}
    </style>
    <script>
        var Config = new Object();
        Config.MsgBox_ok = '确定';
        Config.MsgBox_no = '取消';
    </script></head>
<body class="white">
<div class="wrap pb1">
    <div class="RanKingHead ToRanKingHead" style="position: relative">
        <div class="gohome" style="position: absolute;top: 25px"><a href="./index.php?i=<?php echo $uniacid?>&c=entry&do=index&m=dashen_zaoqizhuanqian"><img src="../addons/dashen_zaoqizhuanqian/images/h11.ico" /></a></div>
        <div class="Fighting">
            <img src="../addons/dashen_zaoqizhuanqian/images/rtodaywartitle.png">
            <div class="Des"><span class="Success"><em>{php echo $success_total+(int)($this->xnumber*$this->xbili/10)}</em>成功</span><span class="Fail"><em>{php echo $fail_total+(int)($this->xnumber*(10-$this->xbili)/10)}</em>失败</span></div>
        </div>
        <div class="TodayStarLsit">
            <ul>
                <li DataUid="0">
                    <div class="Face"> <img src="{php echo $sqzx['headimgurl']==''?'../addons/dashen_zaoqizhuanqian/images/moren.jpg':$sqzx['headimgurl']}"> </div>
                    <div class="Label Label2">手气之星</div>
                    <div class="Name">{$sqzx['nickname']}</div>
                    <div class="Text">{php echo $sqzx['user_total_money']==''?'0':$sqzx['user_total_money']}元</div>
                </li>
                <li DataUid="22914">
                    <div class="Face"> <img src="{php echo $zqzx['headimgurl']==''?'../addons/dashen_zaoqizhuanqian/images/moren.jpg':$zqzx['headimgurl']}"></div>
                    <div class="Label Label1">早起之星</div>
                    <div class="Name">{$zqzx['nickname']}</div>
                    <div class="Text">{php echo date('H:i',strtotime($zqzx['daka_datatime']))} 打卡</div>
                </li>
                <li DataUid="0">
                    <div class="Face"> <img src="{php echo $ylzx['headimgurl']==''?'../addons/dashen_zaoqizhuanqian/images/moren.jpg':$ylzx['headimgurl']}"> </div>
                    <div class="Label Label3">毅力之星</div>
                    <div class="Name">{$ylzx['nickname']}</div>
                    <div class="Text">打卡{php echo $ylzx['user_total_score']==''?'0':$ylzx['user_total_score']}次</div>
                </li>
            </ul>
            <div class="both"></div>
        </div>
    </div>
    <div class="RanKingTitle"><img src="../addons/dashen_zaoqizhuanqian/images/jb.png"><span>排行榜 TOP<em>20</em></span></div>
    <div class="RanKingNav">
        <ul>
            <li class="Hover" DataValue="Luck">手气榜</li>
            <li DataValue="Morning">早起榜</li>
            <li DataValue="Will">毅力榜</li>
        </ul>
        <div class="both"></div>
    </div>
    <div class="RanKingList">
        <ul>
        </ul>
        <div class="both"></div>
    </div>
    <div class="Load"></div>
    <script>
        window.addEventListener("DOMContentLoaded", function() {
            var uniacid = <?php echo $uniacid?>;
            $.ajax({
                url: './index.php?i='+uniacid+'&c=entry&do=Getrank&m=dashen_zaoqizhuanqian&value=Luck',
                type: 'get',
                dataType:'json',
                contentType: "application/x-www-form-urlencoded; charset=utf-8",
                beforeSend:function(XMLHttpRequest){
                    $('.fixed_load').show();
                },
                success:function(Results){
                    $('.Load').html('');
                    $('.RanKingList ul').html('');
                    $('.fixed_load').hide();
                    var FnJson = eval(Results);
                    (function(FnJson){
                        if(FnJson == ''){
                            $('.Load').html('<div class="NoData"><span class="iconfont">&#xe616;</span>还没有排行榜哦</div>');
                        }else{
                            var Html = '';
                            for(var i in FnJson){
                                Html += '<li DataUid="'+FnJson[i].uid+'"> <div class="Face"><img src="'+FnJson[i].headimgurl+'"></div> <span class="Name"></span><span class="Name">'+FnJson[i].nickname+'</span><span class="Money"><em>'+FnJson[i].text+'</em></span> </li>';
                            }
                            $('.RanKingList ul').html(Html);
                        }
                    })(FnJson);
                },
                error:function(XMLHttpRequest){
                    $('.fixed_load').hide();
                    $.MsgBox.Alert('消息',"请求失败，错误状态为："+XMLHttpRequest.status);
                }
            });
        });
        $(document).on('click',".RanKingNav ul li",function(){
            var Value = $(this).attr('DataValue');
            var uniacid = <?php echo $uniacid?>;
            $(this).addClass('Hover').siblings().removeClass('Hover');
            $.ajax({
                url: './index.php?i='+uniacid+'&c=entry&do=Getrank&m=dashen_zaoqizhuanqian&value='+Value,
                type: 'get',
                dataType:'json',
                contentType: "application/x-www-form-urlencoded; charset=utf-8",
                beforeSend:function(XMLHttpRequest){
                    $('.fixed_load').show();
                },
                success:function(Results){
                    $('.Load').html('');
                    $('.RanKingList ul').html('');
                    $('.fixed_load').hide();
                    var FnJson = eval(Results);
                    (function(FnJson){
                        if(FnJson == ''){
                            $('.Load').html('<div class="NoData"><span class="iconfont">&#xe616;</span>还没有排行榜哦</div>');
                        }else{
                            var Html = '';
                            for(var i in FnJson){
                                Html += '<li DataUid="'+FnJson[i].uid+'"> <div class="Face"><img src="'+FnJson[i].headimgurl+'"></div> <span class="Name">'+FnJson[i].nickname+'</span><span class="Money"><em>'+FnJson[i].text+'</em></span> </li>';
                            }
                            $('.RanKingList ul').html(Html);
                        }
                    })(FnJson);
                },
                error:function(XMLHttpRequest){
                    $('.fixed_load').hide();
                    $.MsgBox.Alert('消息',"请求失败，错误状态为："+XMLHttpRequest.status);
                }
            });
        });
    </script>


</div>
{if $blist !=null}
{template buttom}
{/if}
</body>
</html>
